import request from '@/utils/request'


// 获取前端的类型设置
export function frontlist(query) {
  return request({
    url: '/mahjong/room/frontlist',
    method: 'get',
    params: query
  })
}

// 查询房间列表
export function roomList(query) {
  return request({
    url: '/mahjong/record/getRoom',
    method: 'get',
    params: query
  })
}
// 查询房间列表
export function HuoQuShop(id) {
  return request({
    url: '/mahjong/myshops/addShopId/'+id,
    method: 'get'
  })
}


// 查询房间列表
export function listRoom(query) {
  return request({
    url: '/mahjong/room/list',
    method: 'get',
    params: query
  })
}

// 查询房间详细
export function getRoomById(id) {
  return request({
    url: '/mahjong/room/' + id,
    method: 'get'
  })
}
export function clickOpen(id) {
  return request({
    url: '/mahjong/costs/clickOpen/'+id,
    method: 'get'
  })
}
// 新增房间
export function addRoom(data) {
  return request({
    url: '/mahjong/room',
    method: 'post',
    data: data
  })
}

// 修改房间
export function updateRoom(data) {
  return request({
    url: '/mahjong/room',
    method: 'put',
    data: data
  })
}

// 删除房间
export function delRoom(id) {
  return request({
    url: '/mahjong/room/' + id,
    method: 'delete'
  })
}

// 导出房间
export function exportRoom(query) {
  return request({
    url: '/mahjong/room/export',
    method: 'get',
    params: query
  })
}
